package org.lanqiao.tjut.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.lanqiao.tjut.bean.DbCityBean;
import org.lanqiao.tjut.bean.DbProvinceBean;
import org.lanqiao.tjut.dao.DbCityBeanMapper;
import org.lanqiao.tjut.dao.DbProvinceBeanMapper;
import org.lanqiao.tjut.service.ICommonService;
import org.springframework.stereotype.Service;

@Service("commonServiceImpl")
public class CommonServiceImpl implements ICommonService {
	// 组合到层对象，进行依赖注入
	// 组合service层，依赖注入
	@Resource
	private DbProvinceBeanMapper commonProvicneDao;
	@Resource
	private DbCityBeanMapper commonCityDao;

	@Override
	public List<DbProvinceBean> selectAllProvinceInfo() {
		// 调用dao进行数据库查询操作
		return commonProvicneDao.selectAllProvinceInfo();
	}

	@Override
	public List<DbCityBean> selectCitiesByProvinceCode(String provinceCode) {
		// 调用dao进行数据库查询操作
		return commonCityDao.selectCitiesByProvinceCode(provinceCode);
	}

}
